ItemsSourceItem

Ecng.ComponentModel

Represents an item source item with a strongly typed value. Provides functionality for property change notifications.

继承自: NotifiableObject

实现: IItemsSourceItem<T>, IItemsSourceItem, INotifyPropertyChangedEx, INotifyPropertyChanged

构造函数

ItemsSourceItem
public ItemsSourceItem(T value, Func<string> getDisplayName, Func<string> getDescription, Uri iconUri, bool isObsolete)
itemsSourceItem = ItemsSourceItem(value, getDisplayName, getDescription, iconUri, isObsolete)

Represents an item source item with a strongly typed value. Provides functionality for property change notifications.

value
The value of the item.
getDisplayName
Function to get the display name of the item.
getDescription
Function to get the description of the item.
iconUri
The URI of the icon representing the item.
isObsolete
A value indicating whether the item is obsolete.

属性

Description
public string Description { get; }
value = itemsSourceItem.Description

Gets the description of the item.

DisplayName
public string DisplayName { get; }
value = itemsSourceItem.DisplayName

Gets the display name of the item.

Icon
public Uri Icon { get; }
value = itemsSourceItem.Icon

Gets the icon URI of the item.

IsObsolete
public bool IsObsolete { get; }
value = itemsSourceItem.IsObsolete

Gets a value indicating whether the item is marked as obsolete.

Value
public T Value { get; }
value = itemsSourceItem.Value

Gets the strongly typed value of the item.

方法

ToString
public override string ToString()
result = itemsSourceItem.ToString()

Returns the display name of the item.

返回值: The display name.